﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace BL_WServices
{
    /// <summary>
    /// This is the WCF Service which is implementing the interface IRandomNumberGenerator
    /// </summary>
    public class RandomNumberGenerator : IRandomNumberGenerator
    {
        /// <summary>
        /// Random Number Generator to create 6 numbers
        /// </summary>
        /// <returns>Returns a string of 6 numbers that have been generated</returns>
        public string GenerateRandomNumber()
        {
            string num = "";
            Random r = new Random();

            for (int i = 0; i < 6; i++)
            {
                num += r.Next(10).ToString();
            }
            return num;
        }
    }
}
